package com.bwie.controller;

import com.bwie.pojo.R;
import com.bwie.pojo.po.AdmissionsPo;
import com.bwie.service.AdmissionsService;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admissions")
@CrossOrigin
public class AdmissionsController {
    @Autowired
    private AdmissionsService admissionsService;
    @GetMapping("/{changeId}")
    private R getList(@PathVariable Integer changeId){
        return admissionsService.getList(changeId);
    }
    /**
     * 添加评价
     */
    @PostMapping("/add")
    private R add(@RequestBody AdmissionsPo admissionsPo){
        return admissionsService.add(admissionsPo);
    }
}
